﻿using System.Resources;
using System.Reflection;

namespace Rio.Framework.Localisation
{
    public static class Manager
    {

        /// <summary>
        /// Gets the telerik resource.
        /// </summary>
        /// <returns></returns>
        public static ResourceManager GetTelerikResource(string langue)
        {
            switch (langue)
            {
                case "fr-FR":
                    return new ResourceManager("Rio.Framework.Localisation.Localization.TelerikResourcesFrench", Assembly.GetExecutingAssembly());
                case "en-US":
                    return new ResourceManager("Rio.Framework.Localisation.Localization.TelerikResourcesEnglish", Assembly.GetExecutingAssembly());
                case "zh-CN":
                    return new ResourceManager("Rio.Framework.Localisation.Localization.TelerikResourcesChinese", Assembly.GetExecutingAssembly());
                default:
                    return new ResourceManager("Rio.Framework.Localisation.Localization.TelerikResourcesFrench", Assembly.GetExecutingAssembly());
            }
        }

        /// <summary>
        /// Gets the Rio localization resource.
        /// </summary>
        /// <returns></returns>
        public static ResourceManager GetRioResource(string langue)
        {
            switch (langue)
            {
                case "fr-FR":
                    return new ResourceManager("Rio.Framework.Localisation.Localization.RioResourcesFrench", Assembly.GetExecutingAssembly());
                case "en-US":
                    return new ResourceManager("Rio.Framework.Localisation.Localization.RioResourcesEnglish", Assembly.GetExecutingAssembly());
                case "zh-CN":
                    return new ResourceManager("Rio.Framework.Localisation.Localization.RioResourcesChinese", Assembly.GetExecutingAssembly());
                default:
                    return new ResourceManager("Rio.Framework.Localisation.Localization.RioResourcesFrench", Assembly.GetExecutingAssembly());
            }
        }

    }
}
